//
//  HomeAdCollectionViewCell.m
//  Root
//
//  Created by apple on 2016/12/27.
//  Copyright © 2016年 com.GooHarbour. All rights reserved.
//

#import "HomeAdCollectionViewCell.h"

@implementation HomeAdCollectionViewCell

-(void)setModel:(HomeAdModel *)model
{
    _model = model;
    self.adLabel.text = model.name;
    self.timeLabel.text = [Lahelper formattedTimeFromTimeInterval:[model.announceTime integerValue]];
}

-(void)awakeFromNib
{
    [super awakeFromNib];
    self.timeLabel.font = [UIFont systemFontOfSize:12];
    self.adLabel.font = [UIFont systemFontOfSize:13];
}
+(id)cellForCollectionView:(UICollectionView*)collectionView andIndexPath:(NSIndexPath*)indexParh andIdentifier:(NSString*)identifier
{
    [collectionView registerNib:[UINib nibWithNibName:NSStringFromClass([self class]) bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:identifier];
    id cell = [collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexParh];
    return cell;
}
@end
